package com.mh;

import org.springframework.beans.factory.annotation.Autowired;

public class MyService {
    private final MyClass myClass;

    @Autowired
    public MyService(MyClass myClass) {
        this.myClass = myClass;
    }

    public void doSomething() {
        String customValue = myClass.getSettingValue();
        System.out.println("自定义配置的值是: " + customValue);
        // 使用customValue进行其他操作  
    }
}
